package com.yanqu.road.entity.activity.washe.config;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.yanqu.road.entity.activity.ActivityConfig;
import com.yanqu.road.entity.activity.ActivityInfo;
import com.yanqu.road.entity.enums.washe.eWasheModeType;
import com.yanqu.road.utils.LocalDateTimeHelper;
import com.yanqu.road.utils.date.DateHelper;
import com.yanqu.road.utils.property.Property;
import com.yanqu.road.utils.property.PropertyHelper;
import com.yanqu.road.utils.string.StringUtils;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

public class WasheConfig {

    public static int SEASON_ID_NULL = -1;
    public static int SEASON_ID_TEST = 0;

    private ActivityInfo activityInfo;
    private int seasonId;
    private int lastSeasonId;

    // 时间
    private Map<Integer, WasheSeasonConfig> seasonConfigMap;
    private List<List<Long>> dayOpenTime;                                                       // 每日开放时间，已转化时区

    // 读表配置
    private Map<Integer, WasheModeConfig> modeConfigMap;
    private Map<Integer, WasheSceneConfig> sceneConfigMap;
    private Map<Integer, WasheCardConfig> cardConfigMap;
    private Map<Integer, List<WasheBoxConfig>> boxConfigListMap;                                // 宝箱配置（小于等于-1赛季和当前赛季）（key：赛季）
    private Map<Integer, WasheRankConfig> rankConfigMap;                                        // 段位配置（-1赛季和当前赛季）
    private Map<Integer, List<WasheHonorMomentConfig>> honorMomentConfigMap;                    // 荣誉瞬间配置
    private Map<Integer, WasheRoundConfig> roundConfigMap;                                      // 轮次配置（-1赛季和当前赛季）
    private Map<Integer, WasheSkillConfig> skillConfigMap;
    // 缓存
    private Map<Integer, WasheCardConfig> itemCardConfigMap;
    private Map<Integer, WasheSkillConfig> itemSkillConfigMap;

    // 道具ID
    private int sanXiaoBiId;
    private int honorPointId;
    private int multiCardId;
    private int safeCardId;

    // 盘面技能
    private int skillUseTimes;                                                                  // 盘面技能使用次数

    // AI
    private List<Integer> aiOperateTimeList;
    private List<List<Integer>> aiCardQuaWeightList;                                            // [段位起始，段位结束，品质-1权重，品质相等权重，品质+1权重]
    private List<Integer> npcHeadList;                                                          // AI头像
    private List<Integer> npcBodyList;                                                          // AI身体
    private int npcNameNum;                                                                     // AI名字数量
    private List<List<Integer>> aiHardList;                                                     // AI难度，[段位起始，段位结束，难度1权重，难度2权重，难度3权重]
    private int aiRedCardLimit;                                                                 // 人机用红卡分数限制

    // 战斗
    private int blockScore;                                                                     // 每个方块分数
    private int liuXingEliminateNum;                                                            // 流星炸弹消除数
    private int dropBaseWeight;
    private int dropAddiWeight;
    private int dropAddiCountLimit;
    private int dropStableWeight;
    private int drop2OpenRound;                                                                 // 掉落规则2：开启回合
    private List<Integer> drop2List;                                                            // 掉落规则2：参数a|b|c1|c2

    // 盘面机制
    private long unlockSceneScore;                                                              // 盘面机制解锁所需分数
    private int daySceneNum;                                                                    // 每日随机盘面机制数量
    private int sceneBaseWeight;                                                                // 盘面机制随机基础权重
    private int sceneAddiWeight;                                                                // 没随机到的盘面机制，第二天随机时增加权重

    // 宝箱
    private int maxBoxCount;                                                                    // 最大宝箱数量
    private List<Integer> boxWeightList;                                                        // 宝箱权重，顺序：金|银|铜
    private List<Long> boxTimeList;                                                             // 宝箱开启时间，顺序：金|银|铜

    // buff
    private int buffNeedWin;                                                                    // 翻倍buff所需连胜次数
    private int buffTimes;                                                                      // 翻倍buff持续次数
    private List<List<Integer>> winAdditionList = new ArrayList<>();                            // 连胜加成 [达到连胜次数,分数千分比] （这个和翻倍buff二选一）
    private List<List<Integer>> dayTiredList = new ArrayList<>();                               // 每日疲劳值 [对局次数,分数千分比]

    // 道具奖励
    private List<List<Integer>> winGetSanXiaoBiList;                                            // 获胜获得三消币数量 [达到分数比例，三消币数量][达到分数比例，三消币数量]
    private int failGetSanXiaoBi;                                                               // 失败获得三消币数量，固定值
    private int winGetTaskItemNum;                                                              // 获胜获得任务道具数量
    private int failGetTaskItemNum;                                                             // 失败获得任务道具数量

    // 匹配
    private long newHandScore = Long.MAX_VALUE;                                                 // 【跨域没这个参数】新手分数上限，达到这个分数可以脱离新手阶段
    private int matchNpcScore;                                                                  // 小于等于这个分数，只能匹配npc
    private long newHandMatchNpcTime;                                                           // 新手段位匹配超过x秒匹配NPC
    private List<List<Long>> stopMatchTimeList;                                                 // 无法匹配时间段
    private List<Long> disconnFailTimeList;                                                     // 累计掉线x秒判定失败，次数对应下标
    private long firstDisconnTime;                                                              // 第一回合首次首次掉线不算时间
    private List<Long> matchExtendTimeList;                                                     // 匹配拓展段位时间
    private long matchOutTime;                                                                  // 匹配不到人直接匹配NPC
    private List<List<Integer>> matchNeedPlayerNumList;                                         // 匹配所需符合的玩家数量
    private long matchOutScoreLimit;                                                            // 匹配不到人直接匹配NPC的分数限制

    // 榜单
    private long rankNeedScore;                                                                 // 上榜所需分数

    // 现金礼包
    private long rmbMallTime;                                                                   // 现金礼包持续时间
    private long rmbMallCdTime;                                                                 // 现金礼包间隔时间

    // 其他
    private int daySurrenderTimes;                                                              // 每日可投降次数

    // 瓦舍版本
    private int version;                                                                        // 瓦舍版本

    // 人机验证
    private int waiGuaCheckCondition1;                                                          // 玩家点击选择优伶卡时的位置坐标，坐标相同次数达到配置触发人机验证
    private int waiGuaCheckCondition2;                                                          // 玩家在第一回合无移动前使用刷新技能的次数达到配置触发人机验证
    private int waiGuaCheckCondition3;                                                          // 对局进行次数达到配置则进行人机验证
    private int waiGuaCheckTryNum;                                                              // 人机验证允许玩家尝试次数
    private String waiGuaCheckPunishTime;                                                       // 人机验证不通过后禁止匹配时长（按未通过次数配置）
    private String waiGuaCheckReward;                                                           // 人机验证通过后奖励
    private int waiGuaCheckWaitTime;                                                            // 人机验证要求玩家反应时间（秒）

    // --------- ↓锦标赛↓ ---------

    private List<List<Integer>> jinBiaoWinAdditionList = new ArrayList<>();                     // 锦标赛连胜加成 [达到连胜次数,分数千分比]

    private int jinBiaoHighCondition;                                                           // 锦标赛-高级场条件：玩家卡牌品质大于等于
    private int jinBiaoLowCondition;                                                            // 锦标赛-低级场条件：玩家卡牌品质小于等于

    private String jinBiaoHighReward;                                                           // 锦标赛-高级场奖励（胜利奖励@失败奖励）
    private String jinBiaoLowReward;                                                            // 锦标赛-低级场奖励（胜利奖励@失败奖励）

    private int jinBiaoScoreItemId;                                                             // 锦标赛积分道具id
    private int jinBiaoDaySpiritNum;                                                            // 锦标赛每日体力上限
    private int jinBiaoScoreLowCost;                                                           // 锦标赛参加体力消耗数量（低级场）
    private int jinBiaoScoreHighCost;                                                           // 锦标赛参加体力消耗数量（高级场）
    private int jinBiaoTopPeopleNum;                                                            // 锦标赛巅峰赛参与人数
    private int jinBiaoTopAddRoundNum;                                                          // 锦标赛巅峰赛最多加赛回合

    private List<List<Long>> jinBiaoScoreDayOpenTime;                                                       // 积分赛活动每天开放时间，已转化时区
    private List<List<Long>> jinBiaoPeakDayOpenTime;                                                       // 巅峰赛活动每天开放时间，已转化时区

    private int jinBiaoHighWinRewardIntegral;           // 锦标赛-高级场积分奖励（胜利奖励）
    private int jinBiaoHighLoseRewardIntegral;           // 锦标赛-高级场积分奖励（失败奖励）

    private int jinBiaoLowWinRewardIntegral;           // 锦标赛-低级场积分奖励（胜利奖励）
    private int jinBiaoLowLoseRewardIntegral;           // 锦标赛-低级场积分奖励（失败奖励）

    private int jinBiaoHighWinRewardMoney;           // 锦标赛-高级场三消币奖励（胜利奖励）
    private int jinBiaoHighLoseRewardMoney;           // 锦标赛-高级场三消币奖励（失败奖励）

    private int jinBiaoLowWinRewardMoney;            // 锦标赛-低级场三消币奖励（胜利奖励）
    private int jinBiaoLowLoseRewardMoney;           // 锦标赛-低级场三消币奖励（失败奖励）

    private int jinBiaoWaitingTime;                   // 巅峰赛对局房间内准备时间(对方掉线,等待对方最大时间)

    private int jinBiaoPeakAILevel;                     // 巅峰赛小玉托管等级

    private int jinBiaoPeakAiCardId;                    // 巅峰赛小玉卡片id

    private String jinBiaoTopReward;                    // 巅峰赛固定道具奖励（胜利奖励@失败奖励）

    private String jinBiaoScoreStageReward;             // 积分赛阶段性奖励
    private String jinBiaoScoreStageCondition;          // 积分赛阶段性奖励条件


    // --------- ↑锦标赛↑ ---------

    private int useNewRule = 0;     // 新规则开关(消除规则 1 开，0关)


    // ===================== 自己的参数 =====================

    private int showOpponentNum = 10;                                                           // 匹配展示玩家数
    private long showMaxMatchTime = 30 * DateHelper.SECOND_MILLIONS;                            // 匹配最大预计时间
    private int matchTimeParam = 50;                                                            // 匹配预计时间取最近几次的平均值

    private int colorNum = 6;                                                                   // 颜色总数
    private int blockListWidth = 7;                                                             // 盘面宽度
    private int blockListHeight = 7;                                                            // 盘面高度

    private long expressionInterval = DateHelper.SECOND_MILLIONS * 2;                           // 发送表情间隔时间

    private long pingInterval = DateHelper.SECOND_MILLIONS;                                     // 1秒一次ping
    private double disconnectPingTimes = 4.5;                                                   // 4次ping的时间没ping，就是掉线了

    private String npcNamePrefix = "WASHE_AI_NAME_";                                            // AI名字前缀

    private int maxRecordNum = 50;

    private Set<Integer> aiCardSet = new HashSet<>(StringUtils.stringToIntegerList("" +  // AI可选卡片，写完一个加一个
                    "1,2,4,5,7,8,12,13,15,17,18,19,20,21,22",
            ","));

    private ConcurrentHashMap<Integer, WasheHardLevelConfig> hardLevelConfigMap = JSON.parseObject(       // AI难度配置（用最下面的main方法生成）
            "{1:{\"cardWeight\":7000,\"hardLevel\":1,\"moveWeightList\":[-10000,-5000,0,1000,0,0,0],\"skillWeight\":500},2:{\"cardWeight\":7000,\"hardLevel\":2,\"moveWeightList\":[10000,5000,3000,1000,300,0,0],\"skillWeight\":150},3:{\"cardWeight\":7000,\"hardLevel\":3,\"moveWeightList\":[10000,5000,3000,1000,300,150,100],\"skillWeight\":275}}"
            , new TypeReference<ConcurrentHashMap<Integer, WasheHardLevelConfig>>() {
            });

    private int memoryNeedBattleTimes = 3;                                                      // 至少打3把才有赛季回忆

    private WasheHardLevelConfig checkInitBoardConfig = JSON.parseObject(       // 用于检查初始盘面的难度参数（用最下面的main方法生成）
            "{\"cardWeight\":0,\"hardLevel\":-1,\"moveWeightList\":[10000,0,0,0,0,0,0],\"skillWeight\":0}"
            , new TypeReference<WasheHardLevelConfig>() {
            });

    // 备用参数
    public String paramStr1;
    public String paramStr2;
    public List<String> paramList1;

    //优伶卡集合
    private List<Integer> CARD_BOX_ID = new ArrayList<>();

    // ==================================== 其他方法 ====================================

    // 初始化config表配置
    public void initActivityConfig(Map<String, ActivityConfig> activityConfigMap, int channelActivityTimeZone) {

        // WASHEPVP_CREATE_BLOCK_WEIGHT_LIST（弃用）

        // WASHEPVP_CREATE_BLOCK_WEIGHT_NUM（弃用）

        List<Integer> tmpDropList = activityConfigMap.get("WASHEPVP_CREATE_BLOCK_PARAM").getIntListValue(";");
        dropBaseWeight = tmpDropList.get(0);
        dropAddiWeight = tmpDropList.get(1);
        dropAddiCountLimit = tmpDropList.get(2);
        dropStableWeight = tmpDropList.get(3);

        sanXiaoBiId = activityConfigMap.get("WASHEPVP_ITEM_ID_MONEY").getIntValue();

        honorPointId = activityConfigMap.get("WASHEPVP_ITEM_ID_POINT").getIntValue();

        multiCardId = activityConfigMap.get("WASHEPVP_ITEM_ID_DOUBLEBUFF").getIntValue();

        safeCardId = activityConfigMap.get("WASHEPVP_ITEM_ID_SHIELD").getIntValue();

        // WASHEPVP_FREE_SKILL（弃用）

        // WASHEPVP_AI_MATCH_CARD（弃用）

        aiOperateTimeList = activityConfigMap.get("WASHEPVP_AI_MOVE_TIME").getIntListValue("\\|");

        // WASHEPVP_AI_ACTION_PARAM（弃用）

        npcBodyList = activityConfigMap.get("WASHEPVP_AI_APPEARANCE").getIntListValue("\\|");

        blockScore = activityConfigMap.get("WASHEPVP_FIGHT_BLOCK_SCORE").getIntValue();

        daySceneNum = activityConfigMap.get("WASHEPVP_FIGHT_SCENE_RANDOM_NUM").getIntValue();

        sceneBaseWeight = activityConfigMap.get("WASHEPVP_FIGHT_SCENE_WEIGHT_BEGIN").getIntValue();

        sceneAddiWeight = activityConfigMap.get("WASHEPVP_FIGHT_SCENE_WEIGHT_ADD").getIntValue();

        maxBoxCount = activityConfigMap.get("WASHEPVP_FIGHT_WIN_BAG_MAX_NUM").getIntValue();

        boxWeightList = StringUtils.stringToIntegerList(activityConfigMap.get("WASHEPVP_FIGHT_WIN_BAG_WEIGHT").getValue(), "\\|");

        boxTimeList = new ArrayList<>();
        for (long bag_open_time : StringUtils.stringToLongList(activityConfigMap.get("WASHEPVP_FIGHT_WIN_BAG_OPEN_TIME").getValue(), "\\|")) {
            boxTimeList.add(bag_open_time * DateHelper.SECOND_MILLIONS);
        }

        buffNeedWin = activityConfigMap.get("WASHEPVP_FIGHT_DOUBLE_LIMIT").getIntValue();

        winGetSanXiaoBiList = new ArrayList<>();
        for (String reward_money_winer : activityConfigMap.get("WASHEPVP_FIGHT_REWARD_MONEY_WINER").getStringListValue("\\|")) {
            winGetSanXiaoBiList.add(StringUtils.stringToIntegerList(reward_money_winer, ";"));
        }

        failGetSanXiaoBi = activityConfigMap.get("WASHEPVP_FIGHT_REWARD_MONEY_LOSER").getIntValue();

        buffTimes = activityConfigMap.get("WASHEPVP_FIGHT_REWARD_BUFF_TIMES").getIntValue();

        dayOpenTime = parseDayOpenTime(activityConfigMap.get("WASHEPVP_OPEN_TIME").getValue(), channelActivityTimeZone);

        skillUseTimes = activityConfigMap.get("WASHEPVP_SKILL_ID_USE_LIMIT").getIntValue();

        winGetTaskItemNum = activityConfigMap.get("WASHEPVP_FIGHT_WIN_TASK_TIEM_NUM").getIntValue();

        ActivityConfig fight_lose_task_tiem_num = activityConfigMap.get("WASHEPVP_FIGHT_LOSE_TASK_TIEM_NUM"); // 后面添加的参数，丢到前面来了，要判空
        failGetTaskItemNum = fight_lose_task_tiem_num != null ? fight_lose_task_tiem_num.getIntValue() : 0;

        matchNpcScore = activityConfigMap.get("WASHEPVP_MATCH_NPC_SCORE").getIntValue();

        // WASHEPVP_MATCH_NEED_PLAYER_NUM（弃用）

        liuXingEliminateNum = activityConfigMap.get("WASHEPVP_STAR_ELIMINATE_NUM").getIntValue();

        // WASHEPVP_DISCONNECT_FAIL_TIME（弃用）

        npcNameNum = activityConfigMap.get("WASHEPVP_NPC_NAME_NUM").getIntValue();

        // WASHEPVP_EVALUE_SCORE（客户端参数）

        // WASHEPVP_CARD_BOX_ID（客户端参数）
        if(activityConfigMap.containsKey("WASHEPVP_CARD_BOX_ID")){
            CARD_BOX_ID = StringUtils.stringToIntegerList(activityConfigMap.get("WASHEPVP_CARD_BOX_ID").getValue(), "\\|");
        }

        newHandMatchNpcTime = activityConfigMap.get("WASHEPVP_GUIDE_MATCH_NPC_TIME").getIntValue() * DateHelper.SECOND_MILLIONS;

        npcHeadList = activityConfigMap.get("WASHEPVP_AI_HEAD").getIntListValue("\\|");

        rankNeedScore = activityConfigMap.get("WASHEPVP_RANK_NEED_SCORE").getLongValue();

        aiHardList = new ArrayList<>();
        for (String aiHard : activityConfigMap.get("WASHEPVP_AI_HARD").getStringListValue("\\|")) {
            aiHardList.add(StringUtils.stringToIntegerList(aiHard, ";"));
        }

        rmbMallTime = activityConfigMap.get("WASHEPVP_PACKAGE_TIME").getLongValue() * DateHelper.MINUTE_MILLIONS;

        rmbMallCdTime = activityConfigMap.get("WASHEPVP_PACKAGE_CD_TIME").getLongValue() * DateHelper.MINUTE_MILLIONS;

        // ====================== 【非第一版本就有的配置都要判空，并且有默认值】 ======================

        // WASHEPVP_BAG_NEW_ITEM_ID（弃用）

        // WASHEPVP_MATCH_TIP_TIME（客户端参数）

        ActivityConfig fight_scene_open_limit = activityConfigMap.get("WASHEPVP_FIGHT_SCENE_OPEN_LIMIT");
        unlockSceneScore = fight_scene_open_limit != null ? fight_scene_open_limit.getLongValue() : Long.MAX_VALUE;

        ActivityConfig match_need_player_num_2 = activityConfigMap.get("WASHEPVP_MATCH_NEED_PLAYER_NUM_2");
        String match_need_player_num_2_str = match_need_player_num_2 != null ? match_need_player_num_2.getValue() : "1;2|15;10";
        matchNeedPlayerNumList = new ArrayList<>();
        for (String tmp : StringUtils.stringToStringList(match_need_player_num_2_str, "\\|")) {
            matchNeedPlayerNumList.add(StringUtils.stringToIntegerList(tmp, ";"));
        }

        stopMatchTimeList = new ArrayList<>();
        ActivityConfig match_time_limit = activityConfigMap.get("WASHEPVP_MATCH_TIME_LIMIT");
        String match_time_limit_str = match_time_limit != null ? match_time_limit.getValue() : "0;0"; // 海外不需要限制
        for (String tmp : StringUtils.stringToStringList(match_time_limit_str, "\\|")) {
            List<Long> tmpList = new ArrayList<>();
            for (long tmpLong : StringUtils.stringToLongList(tmp, ";")) {
                tmpList.add(tmpLong * DateHelper.MINUTE_MILLIONS);
            }
            stopMatchTimeList.add(tmpList);
        }

        // WASHEPVP_SKIN_SHOW（客户端参数）

        ActivityConfig disconnect_fail_time_2 = activityConfigMap.get("WASHEPVP_DISCONNECT_FAIL_TIME_2");
        String disconnect_fail_time_2_str = disconnect_fail_time_2 != null ? disconnect_fail_time_2.getValue() : "90|60|30|30|0";
        disconnFailTimeList = new ArrayList<>();
        for (long tmp : StringUtils.stringToLongList(disconnect_fail_time_2_str, "\\|")) {
            disconnFailTimeList.add(tmp * DateHelper.SECOND_MILLIONS);
        }

        ActivityConfig match_extend_time = activityConfigMap.get("WASHEPVP_MATCH_EXTEND_TIME");
        String matchExtendTimeStr = match_extend_time != null ? match_extend_time.getValue() : "10|15|20";
        matchExtendTimeList = new ArrayList<>();
        for (long tmp : StringUtils.stringToLongList(matchExtendTimeStr, "\\|")) {
            matchExtendTimeList.add(tmp * DateHelper.SECOND_MILLIONS);
        }

        ActivityConfig fail_first_limit = activityConfigMap.get("WASHEPVP_DISCONNECT_FAIL_FIRST_LIMIT");
        firstDisconnTime = fail_first_limit != null ? fail_first_limit.getLongValue() * DateHelper.SECOND_MILLIONS : DateHelper.SECOND_MILLIONS * 10;

        ActivityConfig match_out_time = activityConfigMap.get("WASHEPVP_MATCH_OUT_TIME");
        matchOutTime = match_out_time != null ? match_out_time.getLongValue() * DateHelper.SECOND_MILLIONS : DateHelper.SECOND_MILLIONS * 120;

        ActivityConfig day_surrender_times = activityConfigMap.get("WASHEPVP_DAY_SURRENDER_TIMES");
        daySurrenderTimes = day_surrender_times != null ? day_surrender_times.getIntValue() : Integer.MAX_VALUE;

        dayTiredList = new ArrayList<>();
        ActivityConfig day_tired_param = activityConfigMap.get("WASHEPVP_DAY_TIRED_PARAM");
        if (day_tired_param != null) {
            for (String timesAndAddition : StringUtils.stringToStringList(day_tired_param.getValue(), "\\|")) {
                dayTiredList.add(StringUtils.stringToIntegerList(timesAndAddition, ";"));
            }
        }

        winAdditionList = new ArrayList<>();
        ActivityConfig win_addition = activityConfigMap.get("WASHEPVP_WIN_ADDITION");
        if (win_addition != null) {
            for (String winAndAddition : StringUtils.stringToStringList(win_addition.getValue(), "\\|")) {
                winAdditionList.add(StringUtils.stringToIntegerList(winAndAddition, ";"));
            }
        }

        ActivityConfig match_out_score_limit = activityConfigMap.get("WASHEPVP_MATCH_OUT_SCORE_LIMIT");
        matchOutScoreLimit = match_out_score_limit != null ? match_out_score_limit.getLongValue() : 23000;

        ActivityConfig ai_match_card_2 = activityConfigMap.get("WASHEPVP_AI_MATCH_CARD_2");
        String ai_match_card_2_str = ai_match_card_2 != null ? ai_match_card_2.getValue() : "1;99999;4;8;0";
        aiCardQuaWeightList = new ArrayList<>();
        for (String aiHard : StringUtils.stringToStringList(ai_match_card_2_str, "\\|")) {
            aiCardQuaWeightList.add(StringUtils.stringToIntegerList(aiHard, ";"));
        }

        ActivityConfig ver = activityConfigMap.get("WASHEPVP_VERSION");
        version = ver != null ? ver.getIntValue() : 0;

        ActivityConfig ai_red_card_limit = activityConfigMap.get("WASHEPVP_AI_RED_CARD_LIMIT");
        aiRedCardLimit = ai_red_card_limit != null ? ai_red_card_limit.getIntValue() : 4200;


        ActivityConfig waigua_check_condition_1 = activityConfigMap.get("WASHEPVP_WAIGUA_CHECK_CONDITION_1");
        waiGuaCheckCondition1 = waigua_check_condition_1 != null ? waigua_check_condition_1.getIntValue() : 3;

        ActivityConfig waigua_check_condition_2 = activityConfigMap.get("WASHEPVP_WAIGUA_CHECK_CONDITION_2");
        waiGuaCheckCondition2 = waigua_check_condition_2 != null ? waigua_check_condition_2.getIntValue() : 3;

        ActivityConfig waigua_check_condition_3 = activityConfigMap.get("WASHEPVP_WAIGUA_CHECK_CONDITION_3");
        waiGuaCheckCondition3 = waigua_check_condition_3 != null ? waigua_check_condition_3.getIntValue() : 10;

        ActivityConfig waigua_check_try_num = activityConfigMap.get("WAIGUA_CHECK_TRY_NUM");
        waiGuaCheckTryNum = waigua_check_try_num != null ? waigua_check_try_num.getIntValue() : 3;

        ActivityConfig waigua_check_punish_time = activityConfigMap.get("WAIGUA_CHECK_PUNISH_TIME");
        waiGuaCheckPunishTime = waigua_check_punish_time != null ? waigua_check_punish_time.getValue() : "1;30|2;60|5;3600|8;4800|10;43200";

        ActivityConfig waigua_check_reward = activityConfigMap.get("WAIGUA_CHECK_REWARD");
        waiGuaCheckReward = waigua_check_reward != null ? waigua_check_reward.getValue() : "101821=5";

        ActivityConfig waigua_check_wait_time = activityConfigMap.get("WAIGUA_CHECK_WAIT_TIME");
        waiGuaCheckWaitTime = waigua_check_wait_time != null ? waigua_check_wait_time.getIntValue() : 30;

        ActivityConfig create_old_keep_round = activityConfigMap.get("WASHEPVP_CREATE_OLD_KEEP_ROUND");
        drop2OpenRound = create_old_keep_round != null ? create_old_keep_round.getIntValue() + 1 : 999;

        ActivityConfig create_new_rule_param = activityConfigMap.get("WASHEPVP_CREATE_NEW_RULE_PARAM");
        drop2List = StringUtils.stringToIntegerList(create_new_rule_param != null ? create_new_rule_param.getValue() : "10|10|10|10", "\\|");

        jinBiaoWinAdditionList = new ArrayList<>();
        ActivityConfig jinBiao_win_addition = activityConfigMap.get("WASHEPVP_WIN_ADDITION_JINBIAO_1");
        if (jinBiao_win_addition != null) {
            for (String jinBiaoWinAddition : StringUtils.stringToStringList(jinBiao_win_addition.getValue(), "\\|")) {
                jinBiaoWinAdditionList.add(StringUtils.stringToIntegerList(jinBiaoWinAddition, ";"));
            }
        }

        ActivityConfig washepvpJinbiaoHighCondition = activityConfigMap.get("WASHEPVP_JINBIAO_HIGH_CONDITION");
        jinBiaoHighCondition = washepvpJinbiaoHighCondition != null ? washepvpJinbiaoHighCondition.getIntValue() : 4;

        ActivityConfig washepvpJinbiaoLowCondition = activityConfigMap.get("WASHEPVP_JINBIAO_LOW_CONDITION");
        jinBiaoLowCondition = washepvpJinbiaoLowCondition != null ? washepvpJinbiaoLowCondition.getIntValue() : 3;

        ActivityConfig washepvpJinbiaoHighReward = activityConfigMap.get("WASHEPVP_JINBIAO_HIGH_REWARD");
        jinBiaoHighReward = washepvpJinbiaoHighReward != null ? washepvpJinbiaoHighReward.getValue() : "110016=2,20|110113=5,20|110005=1,15|110209=5,20|110041=1,20|110160=20,20|117013=1,10@0";

        ActivityConfig washepvpJinbiaoLowReward = activityConfigMap.get("WASHEPVP_JINBIAO_LOW_REWARD");
        jinBiaoLowReward = washepvpJinbiaoLowReward != null ? washepvpJinbiaoLowReward.getValue() : "110014=5,20|110112=5,20|110060=10,15|110209=3,20|110040=5,20|110159=20,20|117010=1,6@0";

        ActivityConfig washepvpItemIdJinbiaoScore = activityConfigMap.get("WASHEPVP_ITEM_ID_JINBIAO_SCORE");
        jinBiaoScoreItemId = washepvpItemIdJinbiaoScore != null ? washepvpItemIdJinbiaoScore.getIntValue() : 101065;

        ActivityConfig washepvpJinbiaoDaySpiritNum = activityConfigMap.get("WASHEPVP_JINBIAO_DAY_SPIRIT_NUM");
        jinBiaoDaySpiritNum = washepvpJinbiaoDaySpiritNum != null ? washepvpJinbiaoDaySpiritNum.getIntValue() : 5;

        ActivityConfig washepvpJinbiaoSpiritCost = activityConfigMap.get("WASHEPVP_JINBIAO_SPIRIT_COST");
        String spiritCostParam = washepvpJinbiaoSpiritCost != null ? washepvpJinbiaoSpiritCost.getValue() : "1|1";
        jinBiaoScoreHighCost = Integer.parseInt(spiritCostParam.split("\\|")[0]);
        jinBiaoScoreLowCost = Integer.parseInt(spiritCostParam.split("\\|")[1]);

        ActivityConfig washepvpJinbiaoTopPeopleNum = activityConfigMap.get("WASHEPVP_JINBIAO_TOP_PEOPLE_NUM");
        jinBiaoTopPeopleNum = washepvpJinbiaoTopPeopleNum != null ? washepvpJinbiaoTopPeopleNum.getIntValue() : 64;

        ActivityConfig washepvpJinbiaoTopAddRoundNum = activityConfigMap.get("WASHEPVP_JINBIAO_TOP_ADD_ROUND_NUM");
        jinBiaoTopAddRoundNum = washepvpJinbiaoTopAddRoundNum != null ? washepvpJinbiaoTopAddRoundNum.getIntValue() : 3;

        ActivityConfig washepvpIntegralopenTime = activityConfigMap.get("WASHEPVP_INTEGRALOPEN_TIME");
        jinBiaoScoreDayOpenTime = washepvpIntegralopenTime != null ? parseDayOpenTime(washepvpIntegralopenTime.getValue(), channelActivityTimeZone) : parseDayOpenTime("600|1320", channelActivityTimeZone);

        ActivityConfig washepvpPeakednessopenTime = activityConfigMap.get("WASHEPVP_PEAKEDNESSOPEN_TIME");
        jinBiaoPeakDayOpenTime = washepvpPeakednessopenTime != null ? parseDayOpenTime(washepvpPeakednessopenTime.getValue(), channelActivityTimeZone) : parseDayOpenTime("0|1440", channelActivityTimeZone);

        ActivityConfig jinbiaoHighRewardIntegral = activityConfigMap.get("WASHEPVP_JINBIAO_HIGH_REWARD_INTEGRAL");
        String jinbiaoHighRewardIntegralStr = jinbiaoHighRewardIntegral != null ? jinbiaoHighRewardIntegral.getValue() : "5#-2";
        jinBiaoHighWinRewardIntegral = Integer.parseInt(jinbiaoHighRewardIntegralStr.split("#")[0]);
        jinBiaoHighLoseRewardIntegral = Integer.parseInt(jinbiaoHighRewardIntegralStr.split("#")[1]);

        ActivityConfig jinbiaoLowRewardIntegral = activityConfigMap.get("WASHEPVP_JINBIAO_LOW_REWARD_INTEGRAL");
        String jinbiaoLowRewardIntegralStr = jinbiaoLowRewardIntegral != null ? jinbiaoLowRewardIntegral.getValue() : "3#-1";
        jinBiaoLowWinRewardIntegral = Integer.parseInt(jinbiaoLowRewardIntegralStr.split("#")[0]);
        jinBiaoLowLoseRewardIntegral = Integer.parseInt(jinbiaoLowRewardIntegralStr.split("#")[1]);

        ActivityConfig jinbiaoHighRewardMoney = activityConfigMap.get("WASHEPVP_JINBIAO_HIGH_REWARD_MONEY");
        String jinbiaoHighRewardMoneyStr = jinbiaoHighRewardMoney != null ? jinbiaoHighRewardMoney.getValue() : "5#2";
        jinBiaoHighWinRewardMoney = Integer.parseInt(jinbiaoHighRewardMoneyStr.split("#")[0]);
        jinBiaoHighLoseRewardMoney = Integer.parseInt(jinbiaoHighRewardMoneyStr.split("#")[1]);

        ActivityConfig jinbiaoLowRewardMoney = activityConfigMap.get("WASHEPVP_JINBIAO_LOW_REWARD_MONEY");
        String jinbiaoLowRewardMoneyStr = jinbiaoLowRewardMoney != null ? jinbiaoLowRewardMoney.getValue() : "3#1";
        jinBiaoLowWinRewardMoney = Integer.parseInt(jinbiaoLowRewardMoneyStr.split("#")[0]);
        jinBiaoLowLoseRewardMoney = Integer.parseInt(jinbiaoLowRewardMoneyStr.split("#")[1]);

        ActivityConfig washepvpJinbiaoWaitingTime = activityConfigMap.get("WASHEPVP_JINBIAO_WAITING_TIME");
        jinBiaoWaitingTime = washepvpJinbiaoWaitingTime != null ? washepvpJinbiaoWaitingTime.getIntValue() : 180;

        ActivityConfig washepvpJinbiaoAi = activityConfigMap.get("WASHEPVP_JINBIAO_AI");
        String washepvpJinbiaoAiStr = washepvpJinbiaoAi != null ? washepvpJinbiaoAi.getValue() : "2#1";
        jinBiaoPeakAILevel = Integer.parseInt(washepvpJinbiaoAiStr.split("#")[0]);
        jinBiaoPeakAiCardId = Integer.parseInt(washepvpJinbiaoAiStr.split("#")[1]);

        ActivityConfig washepvpJinbiaoTopReward = activityConfigMap.get("WASHEPVP_JINBIAO_TOP_REWARD");
        jinBiaoTopReward = washepvpJinbiaoTopReward != null ? washepvpJinbiaoTopReward.getValue() : "110014=5,20|110112=5,20|110060=10,15|110209=3,20|110040=5,20|110159=20,20|117010=1,6@0";

        ActivityConfig jinBiaoScoreStageRewardConfig = activityConfigMap.get("WASHEPVP_JINBIAO_PHASED_REWARD");
        jinBiaoScoreStageReward = jinBiaoScoreStageRewardConfig != null ? jinBiaoScoreStageRewardConfig.getValue() : "110016=2,10@110113=5,15@110005=1,15@110209=5,20";

        ActivityConfig jinBiaoScoreStageConditionConfig = activityConfigMap.get("WASHEPVP_JINBIAO_PHASED_TIME");
        jinBiaoScoreStageCondition = jinBiaoScoreStageConditionConfig != null ? jinBiaoScoreStageConditionConfig.getValue() : "3600,15|7200,10|10800,5|14400,3";

        ActivityConfig useNewRuleConfig = activityConfigMap.get("WASHEPVP_NEW_RULE_USE");
        useNewRule = useNewRuleConfig != null ? useNewRuleConfig.getIntValue() : 1;

        // ====================== 【热更上去的配置】 ======================

        // 2022年11月16日 热更代码
        ActivityConfig stop_match_time = activityConfigMap.get("WASHEPVP_STOP_MATCH_TIME");
        if (stop_match_time != null) {
            paramStr1 = stop_match_time.getValue();
            System.out.println("washe WASHEPVP_STOP_MATCH_TIME load success!");
        }

    }

    // 获取当前赛季配置，无赛季时为null
    public WasheSeasonConfig getWasheSeasonConfig() {
        return seasonConfigMap.get(seasonId);
    }

    // 获取段位
    public WasheRankConfig getWasheRankConfig(long score, boolean guide) {
        int rankId = 0;
        for (WasheRankConfig rankConfig : rankConfigMap.values()) {
            boolean isGuideRank = rankConfig.getSeasonId() == SEASON_ID_NULL;
            if (isGuideRank != guide) {
                continue; // 新手只能拿新手段位，非新手只能拿非新手
            }
            if (score >= rankConfig.getRankScore() && rankId < rankConfig.getRankId()) {
                rankId = rankConfig.getRankId();
            }
        }
        if (rankId != 0) {
            return rankConfigMap.get(rankId);
        }
        //取最大，一个是超分，一个是没有赛季
        if(rankConfigMap.containsKey(rankConfigMap.size())){
            return rankConfigMap.get(rankConfigMap.size());
        }
        return null;
    }

    /**
     * 获取最大的段位id
     */
    public int getMaxRankId() {
        int maxRankId = -1;
        for (WasheRankConfig rankConfig : rankConfigMap.values()) {
            maxRankId = Math.max(maxRankId, rankConfig.getRankId());
        }
        return maxRankId;
    }

    // 获取赛季宝箱
    public List<WasheBoxConfig> getWasheBoxConfigList(int seasonId) {
        return boxConfigListMap.getOrDefault(seasonId, new ArrayList<>());
    }

    // 转化参数
    public List<List<Long>> parseDayOpenTime(String dayOpenTimeStr, int channelActivityTimeZone) {
        // 转化成当地时区
        List<Long> open_time = StringUtils.stringToLongList(dayOpenTimeStr, "\\|");
        for (int i = 0; i < 2; i++) {
            open_time.set(i, LocalDateTimeHelper.convertTimeZone(open_time.get(i) * DateHelper.MINUTE_MILLIONS, channelActivityTimeZone, false));
        }
        // 可能转化完为负、或者超过24点，要处理
        List<List<Long>> listList = new ArrayList<>();
        if (open_time.get(0) < 0) {
            List<Long> tmp1 = new ArrayList<>();
            tmp1.add(open_time.get(0) + DateHelper.DAY_MILLIONS);
            tmp1.add(DateHelper.DAY_MILLIONS);
            List<Long> tmp2 = new ArrayList<>();
            tmp2.add(0L);
            tmp2.add(open_time.get(1));
            listList.add(tmp1);
            listList.add(tmp2);
        } else if (open_time.get(1) > DateHelper.DAY_MILLIONS) {
            List<Long> tmp1 = new ArrayList<>();
            tmp1.add(open_time.get(0));
            tmp1.add(DateHelper.DAY_MILLIONS);
            List<Long> tmp2 = new ArrayList<>();
            tmp2.add(0L);
            tmp2.add(open_time.get(1) - DateHelper.DAY_MILLIONS);
            listList.add(tmp1);
            listList.add(tmp2);
        } else {
            listList.add(open_time);
        }
        return listList;
    }

    // 配置缓存的赛季是否变化
    public boolean isSeasonChange() {
        long now = System.currentTimeMillis();
        WasheSeasonConfig seasonConfig = getWasheSeasonConfig();
        if (seasonConfig != null) {
            // 有赛季判断赛季是否结束
            if (now > seasonConfig.getEndShowTime()) {
                return true;
            }
        } else {
            // 没赛季判断新赛季是否开始
            for (WasheSeasonConfig tmp : seasonConfigMap.values()) {
                if (tmp.getBeginShowTime() <= now && now < tmp.getEndShowTime()) {
                    return true;
                }
            }
        }
        return false;
    }

    // 获取匹配所需玩家数量
    public int getMatchNeedPlayerNum(int rankId) {
        int num = matchNeedPlayerNumList.get(0).get(1);
        for (List<Integer> list : matchNeedPlayerNumList) {
            if (rankId >= list.get(0)) num = list.get(1);
            else break;
        }
        return num;
    }

    // 获取掉线时间，超出后就失败了
    public long getDisconnFailTime(int hadDisconnTimes) {
        int index = Math.min(disconnFailTimeList.size() - 1, hadDisconnTimes);
        return disconnFailTimeList.get(index);
    }

    // 获取匹配范围扩大次数
    public int getMatchExtendTimes(long matchCostTime) {
        long copyTime = matchCostTime;
        int times = 0;

        // 前N-1档一个个扩展
        for (int i = 0; i < matchExtendTimeList.size() - 1; i++) {
            if (copyTime >= matchExtendTimeList.get(i)) {
                copyTime -= matchExtendTimeList.get(i);
                times++;
            } else {
                return times; // 扩展失败
            }
        }

        // 前N-1档都扩展完了，最后一档用除的计算
        long lastValue = matchExtendTimeList.get(matchExtendTimeList.size() - 1);
        if (copyTime > 0 && lastValue > 0) {
            times = times + (int) (copyTime / lastValue);
        }

        return times;
    }

    // 获取人机随机卡牌品质的权重
    public List<Integer> getAiCardQuaWeightList(int rankId) {
        List<Integer> result = null;

        for (List<Integer> list : aiCardQuaWeightList) {
            if (list.get(0) <= rankId && rankId <= list.get(1)) {
                result = list;
                break;
            }
        }
        if (result == null) {
            result = aiCardQuaWeightList.get(aiCardQuaWeightList.size() - 1);
        }

        result = new ArrayList<>(result);
        result.remove(0);
        result.remove(0);
        return result;
    }

    // 获取疲劳加成值
    public int getTiredByTimes(int todayTimes) {
        if (dayTiredList.isEmpty()) {
            return 1000;
        }
        for (List<Integer> list : dayTiredList) {
            if (todayTimes <= list.get(0)) {
                return list.get(1);
            }
        }
        return 0;
    }

    // 获取连胜加成值
    public int getWinAddition(int winTimes) {
        int addition = 1000;
        for (List<Integer> list : winAdditionList) {
            if (winTimes >= list.get(0)) {
                addition = list.get(1);
            } else {
                break;
            }
        }
        return addition;
    }

    // 获取锦标赛连胜加成值
    public int getJinBiaoScoreWinAddition(int winTimes) {
        int addition = 1000;
        for (List<Integer> list : jinBiaoWinAdditionList) {
            if (winTimes >= list.get(0)) {
                addition = list.get(1);
            } else {
                break;
            }
        }
        return addition;
    }

    /**
     * 获取当前锦标赛巅峰赛的轮次
     */
    public int getJinBiaoPeakRound() {
        int round = -1;
        WasheSeasonConfig seasonConfig = getWasheSeasonConfig();
        if (seasonConfig == null) {
            return round;
        }
        long nowTime = System.currentTimeMillis();
        if (nowTime < seasonConfig.getPeakednessBeginTime() || nowTime > seasonConfig.getPeakednessEndTime()) {
            return round;
        }
        for (WasheRoundConfig roundConfig : getRoundConfigMap().values()) {
            if (nowTime >= roundConfig.getWarTime()) {
                round = roundConfig.getRound();
            }
        }
        return round;
    }

    // 当前是否在赛季时间内
    public boolean seasonInTime() {
        WasheSeasonConfig tmpConfig = getWasheSeasonConfig();
        if (tmpConfig != null) {
            long now = System.currentTimeMillis();
            if (tmpConfig.getBeginTime() <= now && now < tmpConfig.getEndTime()) {
                return true;
            }
        }
        return false;
    }

    /**
     * 当前是否在积分赛时间内
     */
    public boolean jinBiaoScoreInTime() {
        WasheSeasonConfig tmpConfig = getWasheSeasonConfig();
        if (tmpConfig != null) {
            long now = System.currentTimeMillis();
            if (tmpConfig.getIntegralBeginTime() <= now && now < tmpConfig.getIntegralEndTime()) {
                return true;
            }
        }
        return false;
    }

    /**
     * 获取锦标赛对局奖励
     *
     * @param modeId 对局类型
     * @param win    是否胜利
     */
    public Property getJinBiaoScoreReward(int modeId, boolean win) {
        String rewardStr;
        if (modeId == eWasheModeType.JinBiaoScoreLow.getValue()) {
            rewardStr = jinBiaoLowReward;
        } else if (modeId == eWasheModeType.JinBiaoScoreHigh.getValue()) {
            rewardStr = jinBiaoHighReward;
        } else if (modeId == eWasheModeType.JinBiaoPeak.getValue()) {
            rewardStr = jinBiaoTopReward;
        } else {
            return null;
        }
        String[] rewardStrSplit = rewardStr.split("@");
        if (win) {
            rewardStr = rewardStrSplit[0];
        } else {
            rewardStr = rewardStrSplit[1];
        }
        if ("0".equals(rewardStr)) {
            return null;
        }
        return PropertyHelper.parseNewStringToProperty(rewardStr);
    }

    /**
     * 获取当前轮次
     * 仅在备战期才算
     */
    public int getCurPeakRound() {
        int round = -1;
        long nowTime = System.currentTimeMillis();
        for (WasheRoundConfig roundConfig : getRoundConfigMap().values()) {
            if (nowTime >= roundConfig.getPreparationTime()) {
                round = Math.max(round, roundConfig.getRound());
            }
        }
        return round;
    }

    public List<Integer> getActivityChannelList() {
        return StringUtils.stringToIntegerList(activityInfo.getParam6(), ";");
    }

    public Property getStageReward(int stage) {
        List<String> list = StringUtils.stringToStringList(jinBiaoScoreStageReward, "@");
        int stageIndex = stage - 1;
        if (stageIndex < 0 || stageIndex >= list.size()) {
            return null;
        }
        return PropertyHelper.parseNewStringToProperty(list.get(stageIndex));
    }

    public List<Integer> getFreeSkillList() {
        List<Integer> list = new ArrayList<>();
        for (WasheSkillConfig skillConfig : skillConfigMap.values()) {
            if (skillConfig.isFree()) {
                list.add(skillConfig.getSkillId());
            }
        }
        return list;
    }

    // ==================================== 部分set方法 ====================================

    public void setNewHandScore(long newHandScore) {
        this.newHandScore = newHandScore;
    }

    public void setActivityInfo(ActivityInfo activityInfo) {
        this.activityInfo = activityInfo;
    }

    public void setSeasonConfigMap(Map<Integer, WasheSeasonConfig> seasonConfigMap) {
        this.seasonConfigMap = seasonConfigMap;

        // 同时修改下当前赛季ID
        seasonId = SEASON_ID_NULL;
        long now = System.currentTimeMillis();
        for (WasheSeasonConfig seasonConfig : seasonConfigMap.values()) {
            if (seasonConfig.getBeginShowTime() <= now && now < seasonConfig.getEndShowTime()) {
                seasonId = seasonConfig.getSeasonId();
                break;
            }
        }

        // 修改最后赛季ID
        lastSeasonId = seasonId;
        if (lastSeasonId == SEASON_ID_NULL) {
            List<WasheSeasonConfig> list = seasonConfigMap.values().stream().sorted(Comparator.comparing(WasheSeasonConfig::getSeasonId).reversed()).collect(Collectors.toList());
            for (WasheSeasonConfig seasonConfig : list) {
                if (System.currentTimeMillis() > seasonConfig.getEndShowTime()) {
                    lastSeasonId = seasonConfig.getSeasonId();
                    break;
                }
            }
        }

    }

    public void setModeConfigMap(Map<Integer, WasheModeConfig> modeConfigMap) {
        this.modeConfigMap = modeConfigMap;
    }

    public void setSceneConfigMap(Map<Integer, WasheSceneConfig> sceneConfigMap) {
        this.sceneConfigMap = sceneConfigMap;
    }

    public void setCardConfigMap(Map<Integer, WasheCardConfig> cardConfigMap) {
        this.cardConfigMap = cardConfigMap;

        // 生成一份以道具ID为key的卡片map
        Map<Integer, WasheCardConfig> itemMap = new ConcurrentHashMap<>();
        for (WasheCardConfig cardConfig : cardConfigMap.values()) {
            itemMap.put(cardConfig.getItemId(), cardConfig);
        }
        this.itemCardConfigMap = itemMap;
    }

    public void setSkillConfigMap(Map<Integer, WasheSkillConfig> skillConfigMap) {
        this.skillConfigMap = skillConfigMap;

        // 生成一份以道具ID为key的卡片map
        Map<Integer, WasheSkillConfig> itemMap = new ConcurrentHashMap<>();
        for (WasheSkillConfig skillConfig : skillConfigMap.values()) {
            itemMap.put(skillConfig.getItemId(), skillConfig);
        }
        this.itemSkillConfigMap = itemMap;
    }

    public void setRankConfigMap(Map<Integer, WasheRankConfig> rankConfigMap) {
        this.rankConfigMap = rankConfigMap;
    }

    public void setRoundConfigMap(Map<Integer, WasheRoundConfig> roundConfigMap) {
        this.roundConfigMap = roundConfigMap;
    }

    public void setHonorMomentConfigMap(Map<Integer, List<WasheHonorMomentConfig>> honorMomentConfigMap) {
        this.honorMomentConfigMap = honorMomentConfigMap;
    }

    // ==================================== get方法 ====================================

    public ActivityInfo getActivityInfo() {
        return activityInfo;
    }

    public int getSeasonId() {
        return seasonId;
    }

    public int getLastSeasonId() {
        return lastSeasonId;
    }

    public Map<Integer, WasheSeasonConfig> getSeasonConfigMap() {
        return seasonConfigMap;
    }

    public List<List<Long>> getDayOpenTime() {
        return dayOpenTime;
    }

    public Map<Integer, WasheModeConfig> getModeConfigMap() {
        return modeConfigMap;
    }

    public Map<Integer, WasheSceneConfig> getSceneConfigMap() {
        return sceneConfigMap;
    }

    public Map<Integer, WasheCardConfig> getCardConfigMap() {
        return cardConfigMap;
    }

    public Map<Integer, WasheCardConfig> getItemCardConfigMap() {
        return itemCardConfigMap;
    }

    public Map<Integer, WasheRankConfig> getRankConfigMap() {
        return rankConfigMap;
    }

    public Map<Integer, WasheRoundConfig> getRoundConfigMap() {
        return roundConfigMap;
    }

    public Map<Integer, List<WasheHonorMomentConfig>> getHonorMomentConfigMap() {
        return honorMomentConfigMap;
    }

    public int getSanXiaoBiId() {
        return sanXiaoBiId;
    }

    public int getHonorPointId() {
        return honorPointId;
    }

    public int getMultiCardId() {
        return multiCardId;
    }

    public int getSafeCardId() {
        return safeCardId;
    }

    public int getSkillUseTimes() {
        return skillUseTimes;
    }

    public List<Integer> getAiOperateTimeList() {
        return aiOperateTimeList;
    }

    public List<List<Integer>> getAiCardQuaWeightList() {
        return aiCardQuaWeightList;
    }

    public List<Integer> getNpcHeadList() {
        return npcHeadList;
    }

    public List<Integer> getNpcBodyList() {
        return npcBodyList;
    }

    public int getNpcNameNum() {
        return npcNameNum;
    }

    public List<List<Integer>> getAiHardList() {
        return aiHardList;
    }

    public int getBlockScore() {
        return blockScore;
    }

    public int getLiuXingEliminateNum() {
        return liuXingEliminateNum;
    }

    public int getDropBaseWeight() {
        return dropBaseWeight;
    }

    public int getDropAddiWeight() {
        return dropAddiWeight;
    }

    public int getDropAddiCountLimit() {
        return dropAddiCountLimit;
    }

    public int getDropStableWeight() {
        return dropStableWeight;
    }

    public int getMaxBoxCount() {
        return maxBoxCount;
    }

    public List<Integer> getBoxWeightList() {
        return boxWeightList;
    }

    public List<Long> getBoxTimeList() {
        return boxTimeList;
    }

    public int getBuffNeedWin() {
        return buffNeedWin;
    }

    public int getBuffTimes() {
        return buffTimes;
    }

    public List<List<Integer>> getWinGetSanXiaoBiList() {
        return winGetSanXiaoBiList;
    }

    public int getFailGetSanXiaoBi() {
        return failGetSanXiaoBi;
    }

    public int getWinGetTaskItemNum() {
        return winGetTaskItemNum;
    }

    public int getFailGetTaskItemNum() {
        return failGetTaskItemNum;
    }

    public long getNewHandScore() {
        return newHandScore;
    }

    public int getMatchNpcScore() {
        return matchNpcScore;
    }

    public long getNewHandMatchNpcTime() {
        return newHandMatchNpcTime;
    }

    public List<List<Long>> getStopMatchTimeList() {
        return stopMatchTimeList;
    }

    public List<Long> getDisconnFailTimeList() {
        return disconnFailTimeList;
    }

    public long getFirstDisconnTime() {
        return firstDisconnTime;
    }

    public List<Long> getMatchExtendTimeList() {
        return matchExtendTimeList;
    }

    public long getMatchOutTime() {
        return matchOutTime;
    }

    public List<List<Integer>> getMatchNeedPlayerNumList() {
        return matchNeedPlayerNumList;
    }

    public long getRankNeedScore() {
        return rankNeedScore;
    }

    public long getRmbMallTime() {
        return rmbMallTime;
    }

    public long getRmbMallCdTime() {
        return rmbMallCdTime;
    }

    public int getShowOpponentNum() {
        return showOpponentNum;
    }

    public long getShowMaxMatchTime() {
        return showMaxMatchTime;
    }

    public int getMatchTimeParam() {
        return matchTimeParam;
    }

    public int getColorNum() {
        return colorNum;
    }

    public int getBlockListWidth() {
        return blockListWidth;
    }

    public int getBlockListHeight() {
        return blockListHeight;
    }

    public long getExpressionInterval() {
        return expressionInterval;
    }

    public long getPingInterval() {
        return pingInterval;
    }

    public double getDisconnectPingTimes() {
        return disconnectPingTimes;
    }

    public String getNpcNamePrefix() {
        return npcNamePrefix;
    }

    public int getMaxRecordNum() {
        return maxRecordNum;
    }

    public Set<Integer> getAiCardSet() {
        return aiCardSet;
    }

    public ConcurrentHashMap<Integer, WasheHardLevelConfig> getHardLevelConfigMap() {
        return hardLevelConfigMap;
    }

    public int getMemoryNeedBattleTimes() {
        return memoryNeedBattleTimes;
    }

    public WasheHardLevelConfig getCheckInitBoardConfig() {
        return checkInitBoardConfig;
    }

    public int getDaySurrenderTimes() {
        return daySurrenderTimes;
    }

    public List<List<Integer>> getDayTiredList() {
        return dayTiredList;
    }

    public long getMatchOutScoreLimit() {
        return matchOutScoreLimit;
    }

    public List<List<Integer>> getWinAdditionList() {
        return winAdditionList;
    }

    public int getVersion() {
        return version;
    }

    public int getAiRedCardLimit() {
        return aiRedCardLimit;
    }

    public int getWaiGuaCheckCondition1() {
        return waiGuaCheckCondition1;
    }

    public int getWaiGuaCheckCondition2() {
        return waiGuaCheckCondition2;
    }

    public int getWaiGuaCheckCondition3() {
        return waiGuaCheckCondition3;
    }

    public int getWaiGuaCheckTryNum() {
        return waiGuaCheckTryNum;
    }

    public String getWaiGuaCheckPunishTime() {
        return waiGuaCheckPunishTime;
    }

    public String getWaiGuaCheckReward() {
        return waiGuaCheckReward;
    }

    public int getWaiGuaCheckWaitTime() {
        return waiGuaCheckWaitTime;
    }

    public long getUnlockSceneScore() {
        return unlockSceneScore;
    }

    public int getDaySceneNum() {
        return daySceneNum;
    }

    public int getSceneBaseWeight() {
        return sceneBaseWeight;
    }

    public int getSceneAddiWeight() {
        return sceneAddiWeight;
    }

    public int getDrop2OpenRound() {
        return drop2OpenRound;
    }

    public List<Integer> getDrop2List() {
        return drop2List;
    }

    public List<List<Integer>> getJinBiaoWinAdditionList() {
        return jinBiaoWinAdditionList;
    }

    public int getJinBiaoHighCondition() {
        return jinBiaoHighCondition;
    }

    public int getJinBiaoLowCondition() {
        return jinBiaoLowCondition;
    }

    public String getJinBiaoHighReward() {
        return jinBiaoHighReward;
    }

    public String getJinBiaoLowReward() {
        return jinBiaoLowReward;
    }

    public int getJinBiaoScoreItemId() {
        return jinBiaoScoreItemId;
    }

    public int getJinBiaoDaySpiritNum() {
        return jinBiaoDaySpiritNum;
    }

    public int getJinBiaoScoreLowCost() {
        return jinBiaoScoreLowCost;
    }

    public int getJinBiaoScoreHighCost() {
        return jinBiaoScoreHighCost;
    }

    public int getJinBiaoTopPeopleNum() {
        return jinBiaoTopPeopleNum;
    }

    public int getJinBiaoTopAddRoundNum() {
        return jinBiaoTopAddRoundNum;
    }

    public List<List<Long>> getJinBiaoScoreDayOpenTime() {
        return jinBiaoScoreDayOpenTime;
    }

    public List<List<Long>> getJinBiaoPeakDayOpenTime() {
        return jinBiaoPeakDayOpenTime;
    }

    public int getJinBiaoHighWinRewardIntegral() {
        return jinBiaoHighWinRewardIntegral;
    }

    public int getJinBiaoHighLoseRewardIntegral() {
        return jinBiaoHighLoseRewardIntegral;
    }

    public int getJinBiaoLowWinRewardIntegral() {
        return jinBiaoLowWinRewardIntegral;
    }

    public int getJinBiaoLowLoseRewardIntegral() {
        return jinBiaoLowLoseRewardIntegral;
    }

    public int getJinBiaoHighWinRewardMoney() {
        return jinBiaoHighWinRewardMoney;
    }

    public int getJinBiaoHighLoseRewardMoney() {
        return jinBiaoHighLoseRewardMoney;
    }

    public int getJinBiaoLowWinRewardMoney() {
        return jinBiaoLowWinRewardMoney;
    }

    public int getJinBiaoLowLoseRewardMoney() {
        return jinBiaoLowLoseRewardMoney;
    }

    public int getJinBiaoWaitingTime() {
        return jinBiaoWaitingTime;
    }

    public int getJinBiaoPeakAILevel() {
        return jinBiaoPeakAILevel;
    }

    public int getJinBiaoPeakAiCardId() {
        return jinBiaoPeakAiCardId;
    }

    public String getJinBiaoTopReward() {
        return jinBiaoTopReward;
    }

    public String getJinBiaoScoreStageReward() {
        return jinBiaoScoreStageReward;
    }

    public String getJinBiaoScoreStageCondition() {
        return jinBiaoScoreStageCondition;
    }

    public int getUseNewRule() {
        return useNewRule;
    }

    public Map<Integer, WasheSkillConfig> getSkillConfigMap() {
        return skillConfigMap;
    }

    public Map<Integer, WasheSkillConfig> getItemSkillConfigMap() {
        return itemSkillConfigMap;
    }

    public Map<Integer, List<WasheBoxConfig>> getBoxConfigListMap() {
        return boxConfigListMap;
    }

    public void setBoxConfigListMap(Map<Integer, List<WasheBoxConfig>> boxConfigListMap) {
        this.boxConfigListMap = boxConfigListMap;
    }

    public List<Integer> getCARD_BOX_ID() {
        return CARD_BOX_ID;
    }

    // ==================================== 备用方法 ====================================

    public void setParamStr1(String paramStr1) {
        this.paramStr1 = paramStr1;
    }

    public void setParamStr2(String paramStr2) {
        this.paramStr2 = paramStr2;
    }

    public void setParamList1(List<String> paramList1) {
        this.paramList1 = paramList1;
    }

    public String getParamStr1() {
        return paramStr1;
    }

    public String getParamStr2() {
        return paramStr2;
    }

    public List<String> getParamList1() {
        return paramList1;
    }

    // ==================================== 测试方法 ====================================

    public static void main(String[] args) {
        testCreateHardStr();
        testCreateCheckInitBoard();
    }

    private static void testCreateHardStr() {
        Map<Integer, WasheHardLevelConfig> hardConfigMap = new ConcurrentHashMap<>();
        WasheHardLevelConfig hardConfig;

        hardConfig = new WasheHardLevelConfig();
        hardConfig.setHardLevel(1);
        hardConfig.setCardWeight(7000);
        hardConfig.setSkillWeight(500); // 不同难度这个不同，这里要大于0，小于1000
        hardConfig.setMoveWeightList(StringUtils.stringToIntegerList("-10000;-5000;0;1000;0;0;0", ";"));
        hardConfigMap.put(hardConfig.getHardLevel(), hardConfig);

        hardConfig = new WasheHardLevelConfig();
        hardConfig.setHardLevel(2);
        hardConfig.setCardWeight(7000);
        hardConfig.setSkillWeight(150); // 不同难度这个不同，这里要大于0，小于300
        hardConfig.setMoveWeightList(StringUtils.stringToIntegerList("10000;5000;3000;1000;300;0;0", ";"));
        hardConfigMap.put(hardConfig.getHardLevel(), hardConfig);

        hardConfig = new WasheHardLevelConfig();
        hardConfig.setHardLevel(3);
        hardConfig.setCardWeight(7000);
        hardConfig.setSkillWeight(275); // 不同难度这个不同，这里要大于100+150，小于300
        hardConfig.setMoveWeightList(StringUtils.stringToIntegerList("10000;5000;3000;1000;300;150;100", ";"));
        hardConfigMap.put(hardConfig.getHardLevel(), hardConfig);

        System.err.println("难度数据结果 hardLevelConfigMap ：");
        System.err.println(JSON.toJSONString(hardConfigMap));
        System.err.println("");
    }

    private static void testCreateCheckInitBoard() {
        WasheHardLevelConfig hardConfig = new WasheHardLevelConfig();
        hardConfig.setHardLevel(-1);
        hardConfig.setCardWeight(0);
        hardConfig.setSkillWeight(0);
        hardConfig.setMoveWeightList(StringUtils.stringToIntegerList("10000;0;0;0;0;0;0", ";"));

        System.err.println("难度数据结果 checkInitBoardConfig ：");
        System.err.println(JSON.toJSONString(hardConfig));
        System.err.println("");
    }
}
